package com.walter.blog.business.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.walter.blog.business.user.service.UserService;
import com.walter.db.mapper.UserMapper;
import com.walter.db.pojo.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 *
 * @author wuchenxi
 * @date 2020-08-07 17:45:53
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public int countByMail(String mail) {
        return userMapper.countByMail(mail);
    }

    @Override
    public User getByAccountAndPassword(String accountOrMail, String password) {

        return userMapper.selectByAccountOrMailAndPassword(accountOrMail, password);
    }
}
